package easy;

public class a326_3的幂 {
    public boolean isPowerOfThree(int n) {
        while (n>=3&&n%3==0){
           n=n/3;
        }
        return n==1;
    }
}
